package com.stwitinc.redmine.dao;

import java.sql.SQLException;

import com.alibaba.fastjson.JSONObject;
import com.stwitinc.data.model.stwnews.News;

public interface NewsDAO
{
	int addNews(News rec, long userId) throws SQLException;

	int deleteNews(long newsId, long userId) throws SQLException;

	JSONObject getNewsById(long newsId) throws SQLException;

	JSONObject getNewsList(int state, int pageIndex) throws SQLException;

	JSONObject getPublishedNewsById(long newsId) throws SQLException;

	JSONObject getPublishedNewsList(int pageIndex, Integer category) throws SQLException;

	int modifyNews(News rec, long userId) throws SQLException;

	int publishNews(long newsId, long userId) throws SQLException;
}
